//
//  HomeViewController.h
//  mUBB
//
//  Created by Cosmin Stirbu on 2/24/13.
//  Copyright (c) 2013 Cosmin Stirbu. All rights reserved.
//

#import "BaseViewController.h"
#import "ListWrapper.h"
#import "CoursesProtocol.h"
#import "RoomsProtocol.h"
#import "Ticket.h"
#import "ZBarReaderViewController.h"

@interface HomeViewController : BaseViewController<UITableViewDelegate, UISearchBarDelegate, UITableViewDataSource, CoursesProtocol, RoomsProtocol, UIAlertViewDelegate, ZBarReaderDelegate> {

    @private
    // Indicates if we are displaying Courses or Rooms
    BOOL _isDisplayingCourses;
    
    // Items (Courses or Rooms)
    ListWrapper *_items;
    
    // Courses Filter
    NSString *_coursesFilter;
    
    // Indicates if the items will be appended
    BOOL _isAppendingItems;
    
    // Last Created Ticket
    Ticket *_lastTicket;
    
    // Last Received Ticket
    Ticket *_lastReceivedTicket;
    
    // Indicates if an alert is already on screen
    BOOL _alertOnScreen;
    
}

// Search Bar
@property (unsafe_unretained, nonatomic) IBOutlet UISearchBar *searchBar;

// TableView
@property (unsafe_unretained, nonatomic) IBOutlet UITableView *resultsTableView;

// Segmented control (Courses|Rooms)
@property (strong, nonatomic) IBOutlet UISegmentedControl *segmentedControl;

@end
